<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/common.jspf"%>
<%@ include file="/common/taglibs.jspf"%>
<html lang="en">
	<head>
      <!-- portal -->
      <link href="${contextPath}/static/widgets/portal/css/inettuts.css" rel="stylesheet" type="text/css" />
      <script type="text/javascript" src="${contextPath}/static/widgets/jquery-ui/js/jquery-ui.js"></script>
      <script type="text/javascript" src="${contextPath}/static/widgets/portal/js/inettuts.js"></script>
      <!-- angularjs -->
      <script type="text/javascript" src="${contextPath }/theme/default/js/angular.js"></script>  
      <style type="text/css">
        .list-table a {color: black;}
        .more-div {text-align: center;padding: 5px;margin: 3px 0;cursor: pointer;}
        .more-div span {font-size: 12px;}
        .more-div:hover {background-color: #f5f5f5;}        
      </style>
      <script type="text/javascript">
      var __CONTEXT_PATH = "${contextPath}"; 
      $(document).ready(function(){    
        
        initAngularjs();        
      });
      </script>
	</head>
	<body>	
      <div class="row-fluid">  
        <div class="pull-right">
          <a href="${contextPath }/assistant/userPortlet/index.do"><i class="icon-briefcase"></i> 个性定制</a>
        </div>  
          
        <div class="clear"></div>
        <div class="columns">          
          <c:forEach items="${userPortlets }" var="item">  
            ${item }  
          </c:forEach>         
        </div>    
      </div>
      <!-- echarts -->
      <script src="${contextPath }/static/widgets/echarts/echarts-all.js"></script>
      <!-- inline scripts related to this page -->
      <script type="text/javascript">
      $(document).ready(function(){    
        iNettuts.init();      
        
        iNettuts.settings.onStop = function(){
          var widgetIds = iNettuts.getWidgetIds();  //注：这里返回的顺序是纵向的
          
          var ids = [];
          $.each(widgetIds, function(i, obj){
            ids.push(obj.substr(obj.indexOf('-')+1, obj.length));
          });
          
          $.webtools.ajax({
            url: "updatePortletsOrder.json",
            params: {"ids":ids.join(',')},
            success: function(reply) {
              
            }
          });   
        }
      });
      </script>
	</body>
</html>
